package javase.module2.task05;

public class DirectionUseTest {
    public static void test1(String str) {
        switch (str) {
            case "向上":
                System.out.println("明月"); break;
            case "向下":
                System.out.println("故乡"); break;
            case "向左":
                System.out.println("左牵黄"); break;
            case "向右":
                System.out.println("右擎苍"); break;
            default:
                System.out.println("泪满裳"); break;
        }
    }


    public static void test2(DirectionEnum de) {
        switch (de) {
            case UP:
                System.out.println("明月"); break;
            case DOWN:
                System.out.println("故乡"); break;
            case LEFT:
                System.out.println("左牵黄"); break;
            case RIGHT:
                System.out.println("右擎苍"); break;
            default:
                System.out.println("泪满裳"); break;
        }
    }

    public static void main(String[] args) {

        DirectionUseTest.test1(Direction.UP.getDesc());
        DirectionUseTest.test1("今天是个好日子");
        System.out.println("---------------------------");
        DirectionUseTest.test2(DirectionEnum.DOWN);
    }
}
